All Questions
48 questions
0votes
1answer
135views
How Can I Make a Book / Book Category?
TblBook.cs public class TBLBook : IEntity { [Key] public int BookId { get; set; } public string BookName { get; set; } [ForeignKey("TblCategory")] public int CategoryId {...
0votes
1answer
971views
Passing a ViewBag/ViewData on each page
I have a very large asp.NET MVC application and I'm looking for the most efficient way of accomplishing adding a help document to each view. So in essence,I have added a partial view inside of the ...
6votes
1answer
5kviews
why MVC and singleton both are 'design pattern'? [duplicate]
Every literature that is searched said that "MVC - is a design pattern assigns..." and the same such pattern as Singleton describes as "a software design pattern". But WHY? These are different things ...
1vote
1answer
542views
Whats the correct scheme of MVC pattern?
Does the controller update the view (first image) or model should update the view (second image)?
0votes
2answers
3kviews
MVC architecture control flow
I am a bit confused how the three components - Model, View, Controller - interact with each other in MVC architecture. Sometimes I feel I know how MVC works and sometimes I feel I don't know its inner ...
-1votes
1answer
392views
What Should a domain Model return when using an interface? [closed]
I have got an MVC application in which the Domain Model (Data Model + Business Model) resides in a different class library. I am using an interface exposing some methods which must return data but not ...
1vote
2answers
306views
pattern best way to connect View to multiple Controllers?
I'm recently doing a purchase order program using the MVC pattern in C# (not ASP.NET web app, just a desktop program). Now the problem is that in the UI there are lots of buttons that will link to ...
0votes
0answers
80views
What is the difference between active MVC and MVVM and how do you implement active MVC in Asp.NET MVC?
I know a similar question is asked here but I am confused on below points How to implement active MVC in asp.net MVC? If active MVC is used with observer pattern or SignalR then what are the ...
2votes
3answers
443views
Is Microsoft's MVC implementation different from classic MVC pattern [closed]
In various articles on the web about ASP.NET MVC I've people mention that Microsoft's implementation of MVC is somehow different form the 'classic' MVC pattern. But I've never seen anyone go into ...
0votes
3answers
377views
ASP.NET MVC: Is "views must be dumb" correct statement?
Most of the good references for MVC on web strongly suggest "views must be dumb". It should not contain any logic. This does not seems valid when I try to implement it. Some of my views display only ...
7votes
2answers
3kviews
Should viewmodels contain static functional methods?
If I have a Viewmodel designed to serve a purpose for a view - Is it a good practice to add bunch of static methods to the viewmodel like - getting a list of items(viewmodel object) by consuming ...
2votes
3answers
6kviews
Is calling service from controller a violation of MVC?
I have seen many code references online they use services directly in the Controller. public class PersonController : Controller { public ActionResult Index(int personId) { Person ...
1vote
1answer
416views
Mvc Application Cache
how can i build data cache for my Application with Repository Pattern? With lock object and persist for each session... public sealed class NewsCache { List<int> _tagsIds = null; static ...
0votes
1answer
315views
ViewModel in Asp.Net MVC vs Knockout.Js [closed]
I'm really confused about how ViewModel works in the context of KnockOut.js and Asp.Net MVC. In Asp.Net MVC, ViewModels are similar to DTOs. They are used to have strongly typed views. It is ...
-1votes
2answers
1kviews
Is MVC a design pattern only or Programming Technology [closed]
Is MVC a design pattern only or Programming Technology? If I violation the MVC pattern like ASP.Net Form Application then any performance issue arise or not.?